
/****************************************************************************
**
** Copyright (C) 2004-2008 VATATA.com . All rights reserved.
**
** This file is the part of the Miniutil Poject.
** Vatata's miniutil library is lightweight and portable (for linux
** and Windows). The C++ Class Library included Threadpool, Dll danymic loading, 
** General socket application model and tcp server, httpserver/servlet, etc. 
** It is a pratical utility disigned for who don't want learn the Big C++ 
** Developing Platform, such as  Boost or ACE.
**
** This file may be used under the terms of the GNU General Public
** License versions 2.0 or 3.0 as published by the Free Software
** Foundation and appearing in the files LICENSE.GPL2 and LICENSE.GPL3
** included in the packaging of this file.  Alternatively you may (at
** your option) use any later version of the GNU General Public
** License if such license has been publicly approved by VATATA.com.
** (or its successors, if any) and the Miniutil Project Aministrators. 
**
** Please review the following information to ensure GNU General
** Public Licensing requirements will be met:
** http://www.gnu.org/licenses/lgpl.html. If you are unsure which 
** license is appropriate for your use, please review the following 
** information: http://code.google.com/p/miniutil/ or contact 
** http://www.vatata.com.
**
** In addition, as a special exception, VATATA.com, as the sole
** copyright holder for Miniutil Project, grants users of VATATA
** P2P Platform the right to release and package with the related 
** libraries without the source code.
**
** This file is provided "AS IS" with NO WARRANTY OF ANY KIND,
** INCLUDING THE WARRANTIES OF DESIGN, MERCHANTABILITY AND FITNESS FOR
** A PARTICULAR PURPOSE. vatata reserves all rights not expressly
** granted herein.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
****************************************************************************/


/* $Id: igd_desc_parse.h,v 1.6 2008/04/23 11:51:07 nanard Exp $ */
/* Project : miniupnp
 * http://miniupnp.free.fr/
 * Author : Thomas Bernard
 * Copyright (c) 2005-2008 Thomas Bernard
 * This software is subject to the conditions detailed in the
 * LICENCE file provided in this distribution.
 * */
#ifndef __IGD_DESC_PARSE_H__
#define __IGD_DESC_PARSE_H__

namespace miniutil
{
    namespace upnp
    {
        /* Structure to store the result of the parsing of UPnP
         * descriptions of Internet Gateway Devices */
        #define MINIUPNPC_URL_MAXSIZE (128)
        struct IGDdatas {
            char cureltname[MINIUPNPC_URL_MAXSIZE];
            char urlbase[MINIUPNPC_URL_MAXSIZE];
            int level;
            /*int state;*/
            /* "urn:schemas-upnp-org:service:WANCommonInterfaceConfig:1" */
            char controlurl_CIF[MINIUPNPC_URL_MAXSIZE];
            char eventsuburl_CIF[MINIUPNPC_URL_MAXSIZE];
            char scpdurl_CIF[MINIUPNPC_URL_MAXSIZE];
            char servicetype_CIF[MINIUPNPC_URL_MAXSIZE];
            /*char devicetype_CIF[MINIUPNPC_URL_MAXSIZE];*/
            /* "urn:schemas-upnp-org:service:WANIPConnection:1"
             * "urn:schemas-upnp-org:service:WANPPPConnection:1" */
            char controlurl[MINIUPNPC_URL_MAXSIZE];
            char eventsuburl[MINIUPNPC_URL_MAXSIZE];
            char scpdurl[MINIUPNPC_URL_MAXSIZE];
            char servicetype[MINIUPNPC_URL_MAXSIZE];
            /*char devicetype[MINIUPNPC_URL_MAXSIZE];*/
            /* tmp */
            char controlurl_tmp[MINIUPNPC_URL_MAXSIZE];
            char eventsuburl_tmp[MINIUPNPC_URL_MAXSIZE];
            char scpdurl_tmp[MINIUPNPC_URL_MAXSIZE];
            char servicetype_tmp[MINIUPNPC_URL_MAXSIZE];
            /*char devicetype_tmp[MINIUPNPC_URL_MAXSIZE];*/
        };

        void IGDstartelt(void *, const char *, int);
        void IGDendelt(void *, const char *, int);
        void IGDdata(void *, const char *, int);
        void printIGD(struct IGDdatas *);
    }
}    

#endif

